-- GENERATED SPELL FOR [Scarlet Chaplain] --


function spell0_4299(pUnit, Event) --@Inner Fire,Self--
pUnit:FullCastSpellOnTarget(1006,pUnit)
pUnit:RegisterEvent('Sorts_4299', 594, 1)
end

function spell1_4299(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(6066,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4299', 30000, 1)
end

function spell2_4299(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(8362,pUnit)
pUnit:RegisterEvent('Sorts_4299', 22000, 1)
end

function Sorts_4299(pUnit, Event)
local choix_sorts_4299 = math.random(0, 2)
if choix_sorts_4299 == 0 then
pUnit:RegisterEvent('spell0_4299', 1, 1)
end
if choix_sorts_4299 == 1 then
pUnit:RegisterEvent('spell1_4299', 1, 1)
end
if choix_sorts_4299 == 2 then
pUnit:RegisterEvent('spell2_4299', 1, 1)
end
end

function mob4299_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4299', math.random(1500, 3000), 1)
end

function mob4299_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4299_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4299_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4299, 1, 'mob4299_Action')
RegisterUnitEvent(4299, 2, 'mob4299_Leave')
RegisterUnitEvent(4299, 3, 'mob4299_Kill')
RegisterUnitEvent(4299, 4, 'mob4299_Die')
